<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<!-- 对一个按钮点击十次后，让某个div显示出来 -->
<body>
  <div id="app">

    <h1 v-if="add!==10">小敏</h1>
    <h1 v-else-if="add===10">小辉</h1>

    <button @click="add++">点击</button>
  </div>
</body>
<script src="./vue.js"></script>

<script>
  const { createApp, ref } = Vue;

  createApp({
    setup() {

      let add = ref(0)
      // let abb = function (){
      //   add.value++;
      // }
      return {
        add,
        // abb
      }
    }
  }).mount('#app')
</script>


</html>